package com.qfedu.zf.user.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.qfedu.zf.common.vo.R;
import com.qfedu.zf.user.entity.Report;
import com.qfedu.zf.user.entity.ReportVO;
import com.qfedu.zf.user.entity.User;
import com.qfedu.zf.user.mapper.ReportMapper;
import com.qfedu.zf.user.mapper.UserMapper;
import com.qfedu.zf.user.service.ReportService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zym
 * @since 2024-06-20
 */
@Service
public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> implements ReportService {

    @Autowired
    private ReportMapper reportMapper;
    @Autowired
    private UserMapper userMapper;
    @Override
    public R selectReportVOList(Integer userId) {

        List<ReportVO> reportVOs = reportMapper.selectReportVOList(userId);

        return R.ok(reportVOs);
    }

    @Override
    public R beReport(Integer userId) {

        List<ReportVO> reportVOs = reportMapper.beReport(userId);
        return R.ok(reportVOs);
    }
}
